import 'package:flutter/material.dart';

import '../entity/app_version.dart';

class AboutPage extends StatelessWidget {
  const AboutPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('关于'),
        leading: IconButton(
          icon: const Icon(Icons.arrow_back),
          onPressed: () => Navigator.of(context).pop(),
        ),
      ),
      body: Column(
        children: [
          Image.asset('images/icon.png'),
          const SizedBox(height: 16),
          const Center(child: Text('豆画像素', style: TextStyle(fontSize: 20))),
          const SizedBox(height: 16),
          Text('作者: hsmyldk'),
          const SizedBox(height: 16),
          Text('版本: ${AppVersion.v0_0_1.version}'),
          const SizedBox(height: 16),
          TextButton(
            onPressed: () {},
            child: Text('开源地址: https://gitee.com/hsmyldk/douhuaxiangsu'),
          ),
        ],
      ),
    );
  }
}
